# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AdSense.V2.Model.Account do
  @moduledoc """
  Representation of an account.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation time of the account.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. Display name of this account.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the account. Format: accounts/pub-[0-9]+
  *   `pendingTasks` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Outstanding tasks that need to be completed as part of the sign-up process for a new account. e.g. "billing-profile-creation", "phone-pin-verification".
  *   `premium` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether this account is premium.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the account.
  *   `timeZone` (*type:* `GoogleApi.AdSense.V2.Model.TimeZone.t`, *default:* `nil`) - The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :name => String.t() | nil,
          :pendingTasks => list(String.t()) | nil,
          :premium => boolean() | nil,
          :state => String.t() | nil,
          :timeZone => GoogleApi.AdSense.V2.Model.TimeZone.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:displayName)
  field(:name)
  field(:pendingTasks, type: :list)
  field(:premium)
  field(:state)
  field(:timeZone, as: GoogleApi.AdSense.V2.Model.TimeZone)
end

defimpl Poison.Decoder, for: GoogleApi.AdSense.V2.Model.Account do
  def decode(value, options) do
    GoogleApi.AdSense.V2.Model.Account.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AdSense.V2.Model.Account do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
